package com.pig4cloud.pigx.admin.api.enums;

/**
 * @author lfx
 * @date 2020/9/25
 * 制度管理状态枚举
 */
public enum SystemManagementTypeEnum {

    GOVERNMENT("1", "党政纪检"),
    ADMINISTRATIVE_WORK("2", "行政办公"),
    ENTERPRISE_MANAGEMENT("3", "企业管理"),
    PERSONNEL_MANAGEMENT("4", "人事管理"),
    BUSINESS_FINANCE("5", "经营财务"),
    SAFETY_MANAGEMENT("6", "安全管理"),
    ARCHIVES_MANAGEMENT("7", "档案管理"),
    TECHNICAL_MANAGEMENT("8", "技术管理");

    private String type;
    private String name;

    SystemManagementTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    // 根据类型获取名称
    public static String getNameByType(String type) {
        for (SystemManagementTypeEnum facilitiesTypeEnum : SystemManagementTypeEnum.values()) {
            if (facilitiesTypeEnum.getType().equals(type)) {
                return facilitiesTypeEnum.getName();
            }
        }
        return null;
    }
}
